package com.example.administrator.testxingpiao.ui.detail;

import com.example.administrator.testxingpiao.bean.GoodsDetailBean;

/**
 * Created by Administrator on 2016/8/8.
 */
public class DetailPresenter implements DetailContract.Presenter{

    private DetailContract.View view;
    private DetailContract.Model model;

    public DetailPresenter(DetailContract.View view,DetailModel model){

        this.view = view;
        this.model = model;
    }

    @Override
    public void getData(String path,int type) {
       model.getGoodsDetail(path, type, new DetailModel.DetailCallBack<GoodsDetailBean>() {
           @Override
           public void GetDetail(GoodsDetailBean goodsDetailBean) {
               view.onGetGoodsDetail(goodsDetailBean);
           }
       });
    }
}
